package threads;

class ThTest1 {
	public static void main(String args[]) {
		Thread th = Thread.currentThread();
		ThTest1 th1 = new ThTest1();
		Employee emp = th1.new Employee();
		emp.finalize();
		emp = null;
		System.out.println("******************");
		for (int i = 0; i < 5; i++) {
			System.out.println("--In Main--:" + th.getName());
			System.gc();
		}
	}

	class Employee {
		public void finalize() {
			Thread th = Thread.currentThread();
			System.out.println("--In finalyze--:" + th.getName());
		}
	}
}